@import '~antd/es/style/themes/default.less';
@editor-height: 100vh;
@playground-height: 100%;

.playgroundCard {
  background-color: #fff;
  width: 100%;
  height: 100%;

  .menuSider {
    background-color: #f8f9fc;
    border-right: 1px solid #ececec;

    :global {
      .ant-layout-sider-children {
        overflow-y: hidden;
        overflow-x: hidden;

        &:hover {
          overflow-y: auto;
        }
      }
    }
  }

  .trigger {
    font-size: 12px;
    position: relative;
    margin: auto;
    color: #6c7f90;
    width: 22px !important;
    left: -1px;
    z-index: 4;
    width: 22px;
    cursor: pointer;
    transition: color 0.3s;
    border-left: 1px #f2f2f2 solid;
    height: 66px;
    background-color: #f8f9fc;
    border: 1px solid #ececec;
    box-sizing: border-box;
    border-bottom-right-radius: 4px;
    border-top-right-radius: 4px;
    border-left: none;
    text-align: center;

    svg {
      position: absolute;
      left: 3px;
      top: 25px;
    }
  }

  .trigger:hover {
    color: @primary-color;
  }
}

.breadDrop {
  color: #7d8a96;
  cursor: pointer;
  font-size: 12px;
  margin-top: -16px;
  :global {
    .ant-select-selector {
      padding-left: 0px;
    }
  }

  &:hover {
    color: @primary-color;
  }
  :global {
    .ant-select-suffix {
      font-size: 10px;
    }
  }
}

.breadDropItem {
  div {
    color: #7d8a96;
  }
}

.playground {
  margin: 0;
  padding: 0;
  background: #fff;
  height: @playground-height !important;
  overflow: hidden;
  position: relative;

  .preview {
    padding: 16px;
    overflow: auto;
    height: 100%;
    width: 100%;
    background-color: #fff;
    position: relative;

    .title {
      font-size: 20px;
      font-weight: 500;
      line-height: 23px;
    }
  }

  .editor {
    overflow: hidden;
    height: 100%;
    background-color: #fff;

    .monaco {
      overflow: hidden;
      height: 100%;
    }
  }

  // 不同视图下的尺寸
  .desktop {
    height: @playground-height;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    > * {
      width: 100%;
      height: 100%;
    }
  }

  .tablet {
    width: 436px;
    height: 328px;
    margin: auto;

    box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.1),
      0px 0px 14px rgba(238, 238, 238, 0.5);
    border-radius: 4px;

    > * {
      height: 328px;
      padding: 16px;
    }

    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }

  .mobile {
    width: 375px;
    height: 328px;
    margin: auto;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.1),
      0px 0px 14px rgba(238, 238, 238, 0.5);
    border-radius: 4px;

    > * {
      height: 328px;
      padding: 16px;
    }
  }

  :global {
    .Pane1,
    .Pane2 {
      max-height: @editor-height;
    }

    .Resizer.vertical {
      height: @editor-height;
    }

    .ant-page-header {
      margin-left: -16px;
      margin-right: 1px;
      z-index: 99;
    }

    .ant-breadcrumb {
      font-size: 12px;
      margin-bottom: 8px;
    }
    .ant-breadcrumb + .ant-page-header-heading {
      margin-top: -8px;
    }
    .ant-layout-has-sider {
      height: 100%;
    }
    .ant-page-header-heading-title {
      font-weight: 500;
    }
    .ant-space-item-split {
      margin-right: 0 !important;
    }
    .ant-breadcrumb {
      display: flex;
    }
  }
}

.editOnGtiHubButton {
  font-size: 16px;
  color: #999;
  vertical-align: middle;
  position: relative;
  top: 2px;
}

.subMenu {
  max-height: 300px;
  overflow-y: auto;
  a {
    color: #6b7f90;
    font-size: 14px;
  }
}

.skeleton {
  padding: 16px;
}
